package com.example.daiyinuo.composite.component;

public class ItDepetment extends OrganizationComponent{
    public ItDepetment(String name) {
        super(name);
    }

    @Override
    public void add(OrganizationComponent organizationComponent) {
        System.out.println("叶子节点，无下一级");
    }

    @Override
    public OrganizationComponent getChild(String name) {
        if(getName().equals(name)){
            return this;
        }
        return null;
    }

    @Override
    public int getStaffCount() {
        return 10;
    }
}
